package com.app.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 
 * </p>
 *
 * @author yoominic
 * @since 2024-05-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_divided_into_record")
public class DividedIntoRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 消费用户id
     */
    private Integer userId;

    /**
     * 总分成代金券
     */
    private BigDecimal totalVoucher;

    /**
     * 市级代理的用户id
     */
    private Integer cityUserId;

    /**
     * 市级区域id
     */
    private String cityId;

    /**
     * 区级代理的用户id
     */
    private Integer areaUserId;

    /**
     * 区级区域id
     */
    private String areaId;

    /**
     * 市级代理获得的券
     */
    private BigDecimal cityVoucher;

    /**
     * 区级代理获得的券
     */
    private BigDecimal areaVoucher;

    /**
     * 平台获得的分成
     */
    private BigDecimal plartformVoucher;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 1正常 / 2 废弃（退款等一系列问题） 
     */
    private Integer status;


    private String serialNumber;


    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String userPhone;

    @TableField(exist = false)
    private String cityUserName;


    @TableField(exist = false)
    private String cityUserPhone;


    @TableField(exist = false)
    private String areaUserName;


    @TableField(exist = false)
    private String areaUserPhone;


    @TableField(exist = false)
    private String areaText;


    @TableField(exist = false)
    private String area;


    @TableField(exist = false)
    private String city;


    private Integer type;

    @TableField(exist = false)
    private String province;
}
